/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.net.greenet.device.logic;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 * 
 * @author LiuShang
 */
public interface IDeviceManagement {
    /**
     * 获取设备列表
     * @return [ {"name": "greenet-1","ip": "192.168.1.1","id":"123","isCCOn":"0" ,"isSCOn":"1"},  {"name":"huawei-1","ip": "192.168.2.1","id":"234","isCCOn":"1","isSCOn":"1"}]
     */
    public JSONArray getDevList();
    /**
     * 获取指定设备的静态信息
     * @param id 设备ID
     * @return {
    "SoftwareVersion": "1-1",
,"device_enable":"1","Probe_Type": "1",
    "DeploySiteName": "JS-NJ_MAN;ZJ-HZ_MAN",
    "IDC_HouseID": "NonHouse_Id",
    "Deploy_Mode": "1",
    "Total_Capability": "50",
    "SlotNum": "5",
    "PreProcSlotNum": "2",
    "AnalysisSlotNum": "2",
    "GPSlotNum": "3",
    "PortsType": [
        {
            "PortType": "1",
            "Ports": [
                {
                    "PortNo": "222",
                    "PortDescription": "abc",
                    "M_LinkID": "123",
                    "M_LinkDesc": "hainan"
                }
            ]
        }
    ]
}
     */
    public JSONObject getDevStaticInfo(String id);
    /**
     * 获取指定设备动态信息
     * @param id 设备ID
     * @return {
    "device_status": "1",
    "isServerChannelConnected":"1",
    "isClientChannelConnected":"1",
    "Total_Ports": [
        {
            "PortNo": "22",
            "PortInfo": "1234",
            "PortUsage": "80",
            "Total_CPU": [
                {
                    "CPU_No": "22",
                    "CPU_Usage": "33"
                }
            ]
        }
    ]
}
     */
    public JSONObject getDevDynamicInfo(String id);
    
    
    /**
     * 获取指定设备策略库信息
     * @param id 设备ID
     * @return 
     */
    public JSONArray getDevPolicyBankInfo(String id);
    /**
     * 创建（编辑）设备实例
     * @param id 设备ID(id为creat为创建，其他为编辑需要传递id值)
     * @param Dev_Name DPI设备名
     * @param Dev_IP DPI设备IP地址
     * @param Probe_Type DPI采集类型 0:DPI 1:EU
     * @param DeploySiteName 本DPI设备部署站点名称
     * @param IDC_HouseID 本IDC设备部署机房名称
     * @param port 端口
     * @param enabled DPI设备启用状态与否 0:没有启用 1:启用
     * @param isServerChannelConnected 服务端通道是否联通 0:未联通 1：联通
     * @param isClientChannelConnected 客户端通道是否联通 0:未联通 1:联通
     * @param description 描述
     * @return 
     */
    public JSONObject editDevInstance(String id,String Dev_Name,String Dev_IP,String Probe_Type,String DeploySiteName,String IDC_HouseID,String port,String enabled,String isServerChannelConnected,String isClientChannelConnected,String description);
    /**
     * 删除设备实例
     * @param Dev_Name DPI设备名
     * @return 
     */
    public JSONObject deleteDevInstance(String Dev_Name);
    /**
     * 编辑指定设备策略库信息
     * @param Dev_Name DPI设备名
     * @param Message_Type 0-255 U接口中UC类型（十进制）
     * @param strategy_name 策略库实例名称
     * @return 
     */
    public JSONObject editDevPolicyBank(String Dev_Name,String Message_Type,String strategy_name);
    /**
     * 获取每类策略策略库信息
     * @return 
     */
    public JSONArray getEveryPolicyBank();
    /**
     * 指定设备启用/停用
     * @param Dev_Name DPI设备名
     * @param device_status 0:没有启用 1:启用
     * @return 
     */
    public JSONObject editDevUse(String Dev_Name,String device_status);
    /**
     * 验证添加设备的名称是否唯一
     * @param device_name 设备实例名称
     * @return 
     */
    public JSONObject verifyDevName(String device_name);
}
